﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PatternFactory
{
    class Program
    {
        static void Main(string[] args)
        {

            Car car1 = CarFactory.GetCar("Tesla");

            Car car2 = (new FactoryMobai()).GetCar();
            Car car3 = (new FactoryTesla()).GetCar();

            Console.WriteLine(car2.name.ToString());
            Console.WriteLine(car3.name.ToString());



            IFactory factory1 = new CarFactory();
            IFactoryMobai fac1Mobai = factory1.ifactoryMobai();
            IFactoryTesla fac1Tesla = factory1.ifactoryTesla();

            fac1Mobai

            Console.ReadKey();

        }
    }
}
